from google.appengine.api import users
from core.auth.decorators import LOGIN_OR_CREATE

def auth(request):
    if request.user:
        is_current_user_admin = users.is_current_user_admin()
    else:
        is_current_user_admin = False
    return {"login_url":users.create_login_url(LOGIN_OR_CREATE+"?next="+request.path),
            "logout_url":users.create_logout_url("/"),
            "is_current_user_admin":is_current_user_admin}
